import request from "@/utils/request";

// 新增帖子评论
export function addPostCommentApi(data: any) {
  return request({
    url: "/client/add_post_comment",
    method: "post",
    data,
  });
}

// 删除帖子评论
export function deletePostCommentApi(data: any) {
  return request({
    url: "/client/delete_post_comment",
    method: "delete",
    data,
  });
}

// 新增点赞
export function addPostLikeApi(data: any) {
  return request({
    url: "/client/add_post_like",
    method: "post",
    headers: {
      "Content-Type": "application/json", // 强制指定为 JSON
    },
    data,
  });
}

// 取消点赞
export function deletePostLikeApi(data: any) {
  return request({
    url: "/client/delete_post_like",
    method: "delete",
    headers: {
      "Content-Type": "application/json", // 强制指定为 JSON
    },
    data,
  });
}

// 获取帖子点赞状态
export function getPostLikeApi(params: any) {
  return request({
    url: "/client/get_post_like",
    method: "get",
    params: {
      postId: params,
    },
  });
}

// 新增游戏评论
export function addGameCommentApi(data: any) {
  return request({
    url: "/game_user_review/add_game_user_review",
    method: "post",
    data,
  });
}
